package com.wuwangfu.stream;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @Author jcshen
 * @Date 2023-02-21
 * @PackageName:com.wuwangfu.stream
 * @ClassName: DReadTextFile
 * @Description: TODO
 * @Version 1.0
 */
public class DReadTextFile {

    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStreamSource<String> line = env.readTextFile("flink-14/data");

        System.out.println(line.getParallelism());
        line.print();

        env.execute();
    }
}
